package com.itheima.test.TCP.normaltest;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class Client {//TCP客户端
    public static void main(String[] args) throws IOException {
        //创建Socket对象,参数(IP地址,端口号)
        Socket socket =new Socket("127.0.0.1",10000);
        //获得对象输出流
        OutputStream outputStream = socket.getOutputStream();
        outputStream.write("Hello".getBytes());
        //释放资源
        socket.close();
        outputStream.close();
    }
}
